<extend name="base" />

<block name="panel">

<div>
  <input type="hidden" value="{$parent['id']}" id="parent_id" />
  <input type="hidden" value="{$parent['name']}" id="parent_name" />
</div>

  <div class="board">

    <div>
      <table class="table table-bordered">
        <colgroup>
          <col width="12%"></col><col width="12%"></col><col width="12%"></col><col width="18%"></col><col width="18%"></col><col width="18%"></col><col width="10%"></col>
        </colgroup>

        <foreach name="menu_list" item="vo" key="id">
            <tr>
              <td><input type="text" value="{$vo.menu_name_en}" id="menu_name_en{$vo.menu_id}"></td>
              <td><input type="text" value="{$vo.menu_name_sc}" id="menu_name_sc{$vo.menu_id}"></td>
              <td><input type="text" value="{$vo.menu_name_tc}" id="menu_name_tc{$vo.menu_id}"></td>
              <td><a href="{$baseurl}Console/link/menu_id/{$vo.menu_id}/parent_name/{$vo.menu_name_en}/parent_id/{$vo.menu_id}"><button class="btn btn-info">expand</button></a></td>
            </tr>

        </foreach>

        <foreach name="link_list" item="vo" key="id">
            <tr>
              <td><input type="text" value="{$vo.link_name_en}" id="link_name_en{$vo.link_id}"></td>
              <td><input type="text" value="{$vo.link_name_sc}" id="link_name_sc{$vo.link_id}"></td>
              <td><input type="text" value="{$vo.link_name_tc}" id="link_name_tc{$vo.link_id}"></td>
              <td><input type="text" value="{$vo.link_addr_en}" id="link_addr_en{$vo.link_id}"></td>
              <td><input type="text" value="{$vo.link_addr_sc}" id="link_addr_sc{$vo.link_id}"></td>
              <td><input type="text" value="{$vo.link_addr_tc}" id="link_addr_tc{$vo.link_id}"></td>
              <td><button id="{$vo.link_id}" class="btn btn-info link_save"> save </button>
              <button id="{$vo.link_id}" class="btn btn-info link_del"> delete </button></td>
            </tr>

        </foreach>
      </table>
    </div>

    <br/>

    <div>
      <button id="add" class="btn btn-info"> add </button> <span style="padding-right:10px;"></span>
    </div>
    <br/>


    <div id="add" style="display:none;">
      <table class="table table-bordered">
        <tr><td>name(en)</td><td>name(sc)</td><td>name(tc)</td><td>url(en)</td><td>url(sc)</td><td>url(tc)</td></tr>
        <tr>
          <td><input type="text" value="" id="name_en" placeholder="英文" /></td>
          <td><input type="text" value="" id="name_sc" placeholder="简体" /></td>
          <td><input type="text" value="" id="name_tc" placeholder="繁体" /></td>
          <td><input type="text" value="" id="url_en" placeholder="http://" /></td>
          <td><input type="text" value="" id="url_sc" placeholder="http://" /></td>
          <td><input type="text" value="" id="url_tc" placeholder="http://" /></td>
        </tr>
      </table>
      <button class="btn btn-info" id="newSave"> save </button>
    </div>
  </div>

  <br/>

</block>